$def with (name,file_list,usb_id)



<html>
<head>
    <title>LCOPA</title>

    <script src="/static/jquery-1.12.1.min.js"></script>
    <script src="/static/jquery.form.js"></script>
</head>
<body>

<form id="control_form" action="/control" method="post">
    <fieldset>
        <legend>请输入角度信息:</legend>

        <p>
            <label for="file_name">uphi文件名：</label><br>
            <select name="file_name">
                $for file in file_list:
                    <option value="$file">$file</option>

            </select>
            <label for="usb_id">usb id：</label><br>
            <select name="usb_id">
                $for id in usb_id:
                <option value="$id">$id</option>

            </select>
            <select name="n_pi">
                <option value="6.2831653" selected="True">2PI</option>
                <option value="12.5663706">4PI</option>

            </select>
            <!--<input type="text" class="text" name="file_name" id="file_name" maxlength="40">-->
            <span id="validateUsername"></span>
        </p>
        <p>
            <label for="angle">角度:</label><br>
            <input type="text" class="text" name="angle" id="angle" maxlength="40">
            <span id="validateEmail"></span>
        </p>
        <p>
            <input type="submit" id="btn_control_form" value="提交"></input>
            <input type="reset" value="重来"></input>
        </p>
    </fieldset>
</form>
<a href="/upload">没有数据点此提交</a>

<script type="text/javascript">

        // wait for the DOM to be loaded
        $$(document).ready(function() {
            // bind 'myForm' and provide a simple callback function
            <!--$$('#control_form').ajaxForm(function() {-->
                 <!--$$(this).ajaxSubmit();-->
                    <!--return false;-->
            <!--});-->
        $$("#btn_control_form").click(function () {
            var options = {
                url: '/control',
                type: 'post',
                dataType: 'text',
                data: $$("#control_form").serialize(),
                success: function (data) {
                    if(data[respone_code] != 200)
                    {
                       alert(data.msg);
                    }
                }
            };
            $$.ajax(options);
            return false;
        });
        });
    </script>
</body>
</html>